import java.io.*; 
import java.util.*; 
 
public class flatfile { 
 
public static class readfile{ 
private Scanner reader; 
 
public void openfile(){ 
try{ 
reader = new Scanner (new File("D:\\A16\\flat file\\flatfiledata.txt")); 
 
} 
catch (Exception e){ 
System.out.println("Could not locate the file"); 
} 
} 
 
public void readfile(){ 
while(reader.hasNext()){ 
String a = reader.next(); 
String b = reader.next(); 
String c = reader.next(); 
System.out.printf("%s %s %s\n",a,b,c); 
} //
} 
 
public void closefile(){ 
reader.close(); 
} 
} 
public static void main(String[] args) { 
 
readfile r = new readfile(); 
r.openfile(); 
r.readfile(); 
r.closefile(); 
} 
}